<?php

declare(strict_types=1);

/**
 * @Author:     Frank
 * @contact     frank_hhm@163.com
 * @Date:       2023-01-13 11:44:02
 * @Last Modified time: 2023-01-13 11:45:51
 */
namespace app\common\dao\user;

use frank\base\BaseDao;
use app\common\model\user\UserGroupModel;

/**
 * Class UserGroupDao
 * @package app\common\dao\user
 */
class UserGroupDao extends BaseDao
{
    /**
     * 设置模型名
     */
    protected function setModel(): string
    {
        return UserGroupModel::class;
    }

    /**
     * 列表
     */
    public function getUserGroupList(array $where = [], int $page, int $limit)
    {
        return $this->search($where)->order('id DESC')->page($page)->paginate($limit)->toArray();
    }

    /**
     * 列表
     */
    public function getUserGroupSelect(array $where = [])
    {
        return $this->search($where)->order('id DESC')->select()->toArray();
    }
}

